# class Car(object):
#     pass
# car = Car()
# car.color = "黑色"
# car.brand = '五菱'
# print(car.color)
# print(car.brand)
# print(car.name)

# try:
#     num_one = int(input("请输入被除数: "))
#     num_two = int(input("请输入除数： "))
#     print("结果为", num_one / num_two)
# except Exception as error:
#     print("出错了，原因： ", error)

# class ShortInputError(Exception):
#     '''自定义异常类'''
#     def _init_(self, length, atleast):
#         self.length = atleast
# try:
#     text = input("请输入密码： ")
#     if len(text) < 3:
#         raise ShortInputError(len(text), 3)
# except ShortInputError as result:
#     print("ShortIputError: 输入的长度是%d,  长度至少应是%d"%
#         (result.length,result.atleast))
# else:
#     print("密码设置成功")

